package com.jie.practice;

import java.util.Arrays;

public class Array {
  public static void main(String[] args) {
       int  [] arr ={13,9,7,4,25,3,14};
        int max=0;
        for (int i = 1; i < arr.length; i++) {
            if (arr[i]>max){
                max=arr[i];
                }
            }
       System.out.println(max);

      int sum = 0;
      System.out.println(Arrays.toString(arr));
      for (int i = 0; i < arr.length ; i++) {
          sum=sum+arr[i];
      }

      System.out.print(sum);
      System.out.println();

      int jj=0;
      for (int i = 0; i < arr.length-1 ; i++) {
          for (int j = 0; j < arr.length-1-i ; j++) {
              if (arr[j+1]>arr[j]){
                  jj=arr[j+1];
                  arr[j+1]=arr[j];
                  arr[j]=jj;

              }

          }

      }
      System.out.println(Arrays.toString(arr));
        }

}



